<!-- 新用户红包 -->
<template>
	<div class="newuserhb" v-if="!hasOnline">
		<div class="left">
			<img src="../../assets/img/xinyonghu.png" >
			<label>新用户注册领388元大礼包</label>
		</div>
		<button type="button" @click="getHB()">
			立即领取<i class="iconfont icon-jiantouyou"></i>
		</button>
	</div>
</template>

<script>
import {mapGetters} from 'vuex';
export default{
	name:'NewUserHB',
	props:['proppath'],
	data(){
		return {
			path:''
		}
	},
	computed:{
		...mapGetters(['hasOnline'])
	},
	methods:{
		getHB(){
			if(this.path!=undefined){
				this.$router.push({path:'/login',query:{jump:this.path}});
			}else{
				this.$router.push({path:'/login'})
			}
		}
	},
	mounted() {
		this.path = this.proppath;
	}
}
</script>

<style scoped>
.newuserhb{
	position: fixed;
	z-index: 100;
	width: 100%;
	font-size: 0.35rem;
	padding: 0.15rem 0;
	bottom: 1.4rem;
	display: flex;
	align-items: center;
	color: white;
	border-radius: 0.2rem 0.2rem 0 0;
	justify-content: space-between;
	background: rgba(0,0,0,.8);
}
.newuserhb img{
	width: 0.8rem;
	margin: 0 0.1rem;
}
.newuserhb .left{
	display: flex;
	align-items: center;
}
.newuserhb button{
	border: 0;
	margin-right: 0.25rem;
	padding: 0 0.25rem 0 0.35rem;
	height: 0.7rem;
	border-radius: 0.35rem;
	background: linear-gradient(#ffd600,#ffc200);
}
</style>
